CentOS 7
Sponsored Link

Install MediaWiki
2015/10/25
 
Install Wiki System MediaWiki.
[1]
PHP 5.4 which is default version of PHP on CentOS 7 is not supoerted by latest version of MediaWiki,
so Install PHP 5.6 and enable it on httpd, refer to here.
[2]
[3] Create a database for MediaWiki.
[root@www ~]#
mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.44-MariaDB MariaDB Server

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# create "mediawiki" databse (set any password for "password" section)

MariaDB [(none)]>
create database mediawiki;

Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on mediawiki.* to mediawiki@'localhost' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit

Bye
[4] Install MediaWiki.
( Make sure and Download the latest one ⇒ https://www.mediawiki.org/wiki/Download/en )
# install from SCLo

[root@www ~]#
yum --enablerepo=centos-sclo-rh -y install rh-php56-php-mysql rh-php56-php-mbstring
[root@www ~]#
wget http://releases.wikimedia.org/mediawiki/1.27/mediawiki-1.27.1.tar.gz

[root@www ~]#
tar zxvf mediawiki-1.27.1.tar.gz

[root@www ~]#
mv mediawiki-1.27.1 /var/www/html/mediawiki

[root@www ~]#
chown -R apache. /var/www/html/mediawiki

[root@www ~]#
systemctl restart httpd
[5] If SELinux is enabled, change rules like follows.
[root@www ~]#
chcon -R -t httpd_sys_rw_content_t /var/www/html/mediawiki

[root@www ~]#
semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/mediawiki

[6] Access to "http://(server's hostname or IP address)/mediawiki/mw-config/" and configure final settings.
[7] Scroll down to the bottom of the page and Click "Continue".
[8] Input Database infomation for MediaWiki to connect.
[9] It's OK to keep default.
[10] Set Wiki name and admin username.
[11] Click "Continue".
[12] Click "Continue".
[13] Setting up completed. Download "LocalSettings.php" and place it under "mediawiki" directory on your server.
[14] This is the index page of MediaWiki. Try to use it.
 
Tweet